package com.zero.singleton.inner;

public class Lancer {
    //私有化构造方法
    private Lancer(){
        System.out.println("Lancer实例被创建");
    }
    //静态内部类中配置实例
    private static class LancerInner {
        private static Lancer instance = new Lancer();
    }
    //对外提供获得实例的方法
    public static Lancer getInstance(){
        return LancerInner.instance;
    }
}
